Global Index
HTML5 JS API Index > Indexed DB Tutorials & Specs

IDBObjectStore

Properties
boolean
autoIncrement
On getting, provides the auto increment flag for this object store.
DOMStringList
indexNames
On getting, provide a list of the names of indexes on objects in this object store. The list MUST be sorted in ascending order using the algorithm defined by step 4 of section 11.8.5, The Abstract Relational Comparison Algorithm of the ECMAScript Language Specification [ECMA-262].
any
keyPath
On getting, returns a value representing the key path of this object store, or null if none. If the key path is a DOMString, the value will be a DOMString equal to the key path. If the key path is a sequence<DOMString>, the value will be a new Array, populated by appending Strings equal to each DOMString in the sequence.
DOMString
name
On getting, provide the name of this object store.
IDBTransaction
transaction
On getting, returns the transaction this object store belongs to.
Operations
IDBRequest
add(any value, optional any key)
If the transaction this IDBObjectStore belongs to has its mode set to "readonly", the implementation MUST throw a DOMException of type ReadOnlyError. If the transaction this IDBObjectStore belongs to is not active, the implementation MUST throw a DOMException of type TransactionInactiveError.
IDBRequest
clear()
If the transaction this IDBObjectStore belongs to has its mode set to "readonly", the implementation MUST throw a DOMException of type ReadOnlyError. If the transaction this IDBObjectStore belongs to is not active, the implementation MUST throw a DOMException of type TransactionInactiveError.
IDBRequest
count(optional any key)
If the transaction this IDBObjectStore belongs to is not active, the implementation MUST throw a DOMException of type TransactionInactiveError. If the object store has been deleted, the implementation MUST throw a DOMException of type InvalidStateError.
IDBIndex
createIndex(DOMString name, (DOMString or sequence<DOMString>) keyPath, optional IDBIndexParameters optionalParameters)
This method creates and returns a new index with the given name in the object store. Note that this method must only be called from within a "versionchange" transaction.
IDBRequest
delete(any key)
If the transaction this IDBObjectStore belongs to has its mode set to "readonly", the implementation MUST throw a DOMException of type ReadOnlyError. If the transaction this IDBObjectStore belongs to is not active, the implementation MUST throw a DOMException of type TransactionInactiveError.
void
deleteIndex(DOMString indexName)
This method destroys the index with the given name in the object store. Note that this method must only be called from within a "versionchange" transaction.
IDBRequest
get(any key)
If the transaction this IDBObjectStore belongs to is not active, the implementation MUST throw a DOMException of type TransactionInactiveError. If the object store has been deleted, the implementation MUST throw a DOMException of type InvalidStateError.
IDBIndex
index(DOMString name)
Returns an IDBIndex representing an index that is part of the object store. Every call to this function on the same IDBObjectStore instance and with the same name returns the same IDBIndex instance. However the retured IDBIndex instance is specific to this IDBObjectStore instance.
IDBRequest
openCursor(optional any? range, optional IDBCursorDirection direction)
If the transaction this IDBObjectStore belongs to is not active, the implementation MUST throw a DOMException of type TransactionInactiveError. If the object store has been deleted, the implementation MUST throw a DOMException of type InvalidStateError.
IDBRequest
put(any value, optional any key)
If the transaction this IDBObjectStore belongs to has its mode set to "readonly", the implementation MUST throw a DOMException of type ReadOnlyError. If the transaction this IDBObjectStore belongs to is not active, the implementation MUST throw a DOMException of type TransactionInactiveError.
Referenced by
IDBCursorsource
IDBDatabasecreateObjectStore(...)
IDBIndexobjectStore
IDBRequestsource
IDBTransactionobjectStore(...)